﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterNhanSuTienLuong.Master" Inherits="System.Web.Mvc.ViewPage<DTTB.MV2.QUANLYNHANSUTIENLUONG.Models.FormBean.NhanVienModel.XeVanTaiForm>" %>

<%@ Import Namespace="DTTB.MV2.QUANLYNHANSUTIENLUONG.Models.LinQ.NhanVien" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
        <script language="javascript" type="text/javascript">
            $(document).ready(function () {
                selectMenu("XeVanTai-DanhSachXeVanTai");
                $("#XeVanTai-DanhSachXeVanTai").parent().attr("class", "expanded");
            });
    </script>
      <script type="text/javascript" language="javascript" src="<%= ResolveUrl("~/Content/Scripts/NhanVien/XeVanTai.js") %>"></script>
      <form id="form" action="#" class="formBox">
           <div class="box">
       <div class="breadcrumbs">
          <ul>
            <li class="home"><a href="">Quản lý xe</a></li>
            <li><a href="">Danh sách xe</a></li>
            <li>Page</li>
          </ul>
        </div>
        <div class="headlines">
            <h2>
                <span>Danh sách Xe </span>
            </h2>
             <%--   <a class="show-filter" href="#">show filter</a>--%>
        </div>
      <table class="table_outsite" style="width: 100%">
            <tr>
                <td colspan="2">
                    <div id="Message" style="font-size: 12px; color: Blue; font-weight: bold">
                        <%=Model.Message%>
                    </div>
                    <div id="MessageError" style="font-size: 12px; color: Red; font-weight: bold">
                        <%=Model.MessageError%>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="text-align: left">
                    <div style="display: inline;">
                        Tìm kiếm
                    </div>
                    <select style="display: inline" name="SearchObject" id="SearchObject">
                         <option value="SoXe" <% if(Model.SearchObject == "SoXe") { %>
                            selected="selected" <% } %>>Bảng kiểm soát</option>
                    </select>
                    <input type="text" id="SearchInput" name="SearchInput" value="<%= Model.SearchInput %>"
                        style="display: inline; width: 300px" onkeypress="javascript:return keypressforQuickSearch(event, 'NhanVien', 'DanhSachNhanVien'
                            , $('#SearchObject').val(), $('#SearchInput').val(), 1)" />
                    <img onclick="javascript:DoSearch();" style="vertical-align: middle; cursor: pointer"
                        src="<%=ResolveUrl("~/Content/ImagesAdmin/search_icon.gif")%>" alt="Tìm kiếm"
                        title="Tìm kiếm " />
                </td>
                <td align="right" class="btn-submit">
                    <input type="button" class="button" value="Thêm mới xe vận tải" onclick="javascript:DoOpenNew();" />
                   <%-- <input type="button" value="Xóa" onclick="javascript:DoDelete();" />--%>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <table class="tab tab-drag" style="width: 100%">
                        <thead>
                            <tr class="top nodrop nodrag" style="font-weight: bold">
                                <td class="first" align="center">
                                    STT
                                </td>
                                <td nowrap="nowrap">
                                    <strong>Bảng kiểm soát </strong>
                                </td>
                                <td nowrap="nowrap">
                                    <strong>Năm sản xuất </strong>
                                </td>
                                <td nowrap="nowrap">
                                    <strong>Hết năm </strong>
                                </td>
                                <td nowrap="nowrap">
                                    <strong>Trọng tải</strong>
                                </td>
                                <td nowrap="nowrap">
                                    <strong>Dạng thùng xe </strong>
                                </td>
                                <td nowrap="nowrap">
                                    <strong>Hạn kiểm định xe </strong>
                                </td>
                                <td nowrap="nowrap" class="last">
                                    <strong>Hết hạn bảo hiểm </strong>
                                </td>
                            </tr>
                        </thead>
                        <tbody>
                            <% 
                                int stt = (Model.Pagenumber - 1) * DTTB.Common.CommonVariables.PaggedItemsPerPage + 1;
                                foreach (pt_XeVanTai item in Model.XeVanTaiPagedList)
                                {
                            %>
                            <tr class="odd" >
                                <td align="center" class="first">
                                    <%= stt %>
                                </td>
                                <td>
                                    <a style="cursor: pointer"  onclick="javascript:DoViewDetail(<%= item.Id %>)">
                                        <%= item.BangKiemSoat%>
                                    </a>
                                </td>
                                <td>
                                    <span >
                                        <%= item.NamSanXuat %>
                                    </span>
                                </td>
                                 <td>
                                    <span >
                                        <%= item.NamHanSuDung %>
                                    </span>
                                </td>
                                 <td>
                                    <span >
                                        <%= item.TrongTai %>
                                    </span>
                                </td>
                                 <td>
                                    <span >
                                        <%= item.dm_DangThungXe.TenThungXe %>
                                    </span>
                                </td>
                                <td>
                                    <span >
                                       <a href='<%=ResolveUrl("~/NhanVien/DanhSachLichSuNgayDK/" + item.Id.ToString() ) %>' title="Xem lịch sử thây đổi ngày đăng kiểm"> <%= string.Format("{0:dd/MM/yyyy}",item.HanKiemDinhXe) %></a> 
                                    </span>
                                </td>
                               <td class="last">
                                    <span >
                                           <a href='<%=ResolveUrl("~/NhanVien/DanhSachLichSuNgayBH/" + item.Id.ToString()) %>' title="Xem lịch sử thây đổi ngày hết hạn bảo hiểm">   <%= string.Format("{0:dd/MM/yyyy}",item.HetHanBaoHiem) %></a>
                                      </span>
                                </td>
                              </tr>
                            <%
                            stt++;}
                            %>
                        </tbody>
                        <tfoot>
                            <tr class="border_bottom">
                                <td class="first" style="background: #DDDDDD">
                                </td>
                                <td class="last" colspan="9" align="right" style="background: #DDDDDD; padding-right: 10px">
                                    <%
                                        PagerOptions pagerOptions = new PagerOptions();
                                        DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate.CommonDelegate CommonDelegate= new  DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate.CommonDelegate();
                                        CommonDelegate.ChangeTextPaging(pagerOptions, "id");
                                    %>
                                    <div>
                                        <%=Html.Pager(Model.XeVanTaiPagedList, pagerOptions, new object())%></div>
                                    <%=Html.Hidden("Pagenumber", Model.Pagenumber)%>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </td>
            </tr>
        </table>
        </div>
        </form>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    
</asp:Content>
